import http from '@/api/http';
import file_save from 'file-saver';

//封装用户类型的接口方法
export class UserApi {

    // 登录
    static async login(params: any) {
        const user_data = await http.post("/user/login", params, {responseType: 'json'});
        return user_data.data;
    }

    // 退出
    static logout(params: any) {
        // return http.post('/user/logout', params, {responseType: 'json'});
    }

    // 注册
    static async regist(params: any) {
        const data = await http.get('/user/register', params, {responseType: 'json'});
        return data.data;
    }

    // 修改
    static async modify(params: any) {
        const data = await http.post('/user/update', params, {responseType: 'json'});
        return data.data;
    }

    // 查询
    static get(params: any) {
        // return http.post('/user/modify', params, {responseType: 'json'})
    }
}